package com.mes.device.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mes.device.mapper.DeviceMaintenanceMapper;
import com.mes.device.domain.DeviceMaintenance;
import com.mes.device.service.IDeviceMaintenanceService;

/**
 * 设备保养Service业务层处理
 * 
 * @author itflash
 * @date 2025-02-27
 */
@Service
public class DeviceMaintenanceServiceImpl implements IDeviceMaintenanceService 
{
    @Autowired
    private DeviceMaintenanceMapper deviceMaintenanceMapper;

    /**
     * 查询设备保养
     * 
     * @param id 设备保养主键
     * @return 设备保养
     */
    @Override
    public DeviceMaintenance selectDeviceMaintenanceById(Long id)
    {
        return deviceMaintenanceMapper.selectDeviceMaintenanceById(id);
    }

    /**
     * 查询设备保养列表
     * 
     * @param deviceMaintenance 设备保养
     * @return 设备保养
     */
    @Override
    public List<DeviceMaintenance> selectDeviceMaintenanceList(DeviceMaintenance deviceMaintenance)
    {
        return deviceMaintenanceMapper.selectDeviceMaintenanceList(deviceMaintenance);
    }

    /**
     * 新增设备保养
     * 
     * @param deviceMaintenance 设备保养
     * @return 结果
     */
    @Override
    public int insertDeviceMaintenance(DeviceMaintenance deviceMaintenance)
    {
        return deviceMaintenanceMapper.insertDeviceMaintenance(deviceMaintenance);
    }

    /**
     * 修改设备保养
     * 
     * @param deviceMaintenance 设备保养
     * @return 结果
     */
    @Override
    public int updateDeviceMaintenance(DeviceMaintenance deviceMaintenance)
    {
        return deviceMaintenanceMapper.updateDeviceMaintenance(deviceMaintenance);
    }

    /**
     * 批量删除设备保养
     * 
     * @param ids 需要删除的设备保养主键
     * @return 结果
     */
    @Override
    public int deleteDeviceMaintenanceByIds(Long[] ids)
    {
        return deviceMaintenanceMapper.deleteDeviceMaintenanceByIds(ids);
    }

    /**
     * 删除设备保养信息
     * 
     * @param id 设备保养主键
     * @return 结果
     */
    @Override
    public int deleteDeviceMaintenanceById(Long id)
    {
        return deviceMaintenanceMapper.deleteDeviceMaintenanceById(id);
    }
}
